﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using ObjectLibrary;

// -----------------------------------------------------------------------
// <copyright file="$safeitemrootname$.cs" company="$registeredorganization$">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------
namespace _0912089_0912172
{
    public abstract class MyVideo : VisibleGameEntity3D
    {
        protected Texture2D texture;
        protected Video video;
        protected VideoPlayer videoPlayer;
        protected bool flag = true;

        public void Play()
        {
            if (videoPlayer.State != MediaState.Playing && flag)
            {
                videoPlayer.Play(video);
                flag = false;
            }
        }

        public bool isStop()
        {
            return (videoPlayer.State == MediaState.Stopped && !flag);
        }

        public void Stop()
        {
            if (videoPlayer.State != MediaState.Stopped)
            {
                videoPlayer.Stop();
            }
        }
    }
}
